/*--------------------------------------------------------------------------------*/
#ifndef __GRAPHIC_EXTENSION_MANAGER__
#define __GRAPHIC_EXTENSION_MANAGER__
/*--------------------------------------------------------------------------------*/
#include "primitives.h"
#include "object.h"
#include "util.h"
#include "debug.h"
#include "ref_to_.h"
#include "table.h"
/*--------------------------------------------------------------------------------*/
enum GRAPHIC_EXTENSION
{
	GRAPHIC_EXTENSION_VertexBufferObject,
	GRAPHIC_EXTENSION_ShadingLanguage100,
	GRAPHIC_EXTENSION_ShaderObjects,
	GRAPHIC_EXTENSION_VertexShader,
	GRAPHIC_EXTENSION_FragmentShader,
	GRAPHIC_EXTENSION_Count
};
/*--------------------------------------------------------------------------------*/
class GRAPHIC_EXTENSION_MANAGER : public OBJECT
{

public:

    DECLARE_REF( GRAPHIC_EXTENSION_MANAGER );
    DECLARE_SINGLETON( GRAPHIC_EXTENSION_MANAGER );

    // .. CONSTRUCTORS

    GRAPHIC_EXTENSION_MANAGER() : OBJECT()
    {
    }

    ~GRAPHIC_EXTENSION_MANAGER()
    {
    }

    // .. METHODS

    VOID Initialize();

    BOOL IsExtensionSupported( const GRAPHIC_EXTENSION extension )
    {
    	return ExtensionIsEnabledTable[ extension ];
    }

    // -- PRIVATE

private :

    // .. ATTRIBUTES

    TABLE< BOOL, GRAPHIC_EXTENSION_Count >
		ExtensionIsEnabledTable;
};
/*--------------------------------------------------------------------------------*/
#endif
